﻿using Furion.DatabaseAccessor;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Hu.Smart.Core.Messages
{
    [Table("T_S_Messages")]
    public class Message : EntityBase<Guid>
    {
        public Message()
        {
        }

        public Message(string from, string to, string messageType)
        {
            From = from;
            To = to;
            MessageType = messageType;
        }

        public string AppId
        {
            get; set;
        }

        public string From
        {
            get; set;
        }

        public string To
        {
            get; set;
        }

        public string CC
        {
            get; set;
        }

        public string BCC
        {
            get; set;
        }

        public string Title
        {
            get; set;
        }

        public string Content
        {
            get; set;
        }

        public int Priority
        {
            get; set;
        }

        public string MessageType
        {
            get; set;
        }

        public string Url
        {
            get; set;
        }

        public string Direction
        {
            get; set;
        }

        public int Status
        {
            get; set;
        }

        public DateTime? CompletedTime
        {
            get; set;
        }

        public int TryTimes
        {
            get; set;
        }

        public string Exception
        {
            get; set;
        }

        public string CustomData
        {
            get; set;
        }

        public string Result
        {
            get; set;
        }

        public DateTime? StartTime
        {
            get; set;
        }
    }
}